Many modern devices have software or hardware security features that are intended to prevent unauthorized access to consumer devices. Such features include requiring a user to enter credentials after a device has experienced a period of inactivity or requiring a user to enter credentials to decrypt sensitive information. However, these security features can be inconvenient when authorized users are unnecessarily forced to confirm their identity in situations where the device is at low risk for a security breach. On the other end of the spectrum, because such security features are often inflexible and do not take the user's surroundings and other environmental factors into account, such security features may be inadequate in situations where the device is at a high risk of a security breach.